<%-- 
    Document   : LessionList
    Created on : Jul 10, 2013, 7:07:43 PM
    Author     : NgocNTP60573
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="css/lessonList.css" rel="stylesheet" type="text/css" media="all"/>
        <title>Lesson List</title>
    </head>
    <body onload="transformXMLwithXSLT('xml/getLessonListByOptionId.xml', 'xsl/lessonList.xsl')">
        <c:choose>
            <c:when test="${param.ID=='1' or param.ID=='2'}">
                <c:set var="id" value="Sơ Cấp"/>
            </c:when>
            <c:otherwise>
                <c:set var="id" value="Trung Cấp"/>
            </c:otherwise>
        </c:choose>
        <c:if test="${not empty ACCOUNT}">
            <c:if test="${ACCOUNT =='admin'}">
                <c:redirect url="ControllerServlet">
                    <c:param name="optionId" value="${param.ID}"/>
                    <c:param name="optionType" value="${id}"/>
                    <c:param name="action" value="lessonListAdmin"/>
                </c:redirect>
            </c:if>
        </c:if>
        <div style="margin: auto; width: 990px;">
            <div class="header">
                <c:import url="header.jsp"/>
            </div>
            <div class="content">
                <div class="content_left">
                    <c:choose>
                        <c:when test="${not empty USERNAME}">
                            <c:import url="login-success.jsp">
                                <c:param name="user" value="${USERNAME}"/>
                            </c:import>
                        </c:when>
                        <c:otherwise>
                            <c:import url="loginBox.jsp"/>
                        </c:otherwise>
                    </c:choose>
                </div>
                <div class="content_right">
                    <div class="title">
                        <div class="title_left">
                            ${id}
                        </div>
                        <div class="subtitle">
                        </div>
                    </div>
                    <div style="margin: 20px;">
                        <c:import var="xslDoc" url="xsl/lessonList.xsl" charEncoding="UTF-8"/>
                        <c:import var="xmlDoc" url="xml/getLessonListByOptionId.xml" charEncoding="UTF-8"/>
                        <x:transform xml="${xmlDoc}" xslt="${xslDoc}"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="foot-wrap">
            Assignment - Group Điền Nam Ngọc<br/>
            FPT - University
        </div>
    </body>
</html>
